// 这个getters模块中放的属性,为了在组件中方便使用
// $store.state.user.userInfo.name
// $store.getters.name
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username, // 建立用户的映射
  staffPhoto: state => state.user.userInfo.staffPhoto // 建立用户头像的映射
  // token: state => state.user.token,
  // avatar: state => state.user.avatar,
  // name: state => state.user.name
  // getters是基于state中的状态派生出的新状态 计算属性
  /* name1: function(state) {
    return state.user.name
  } */
}
export default getters
